package handler

import (
	"bytes"
	"encoding/binary"

	"github.com/cz-it/gonnectd/src/proto"
)

type Heartbeat struct {
}

func NewHeartbeat() *Heartbeat {
	heartbeat := new(Heartbeat)
	return heartbeat
}

func (hb *Heartbeat) Proc(proto.Body) []byte {
	buf := new(bytes.Buffer)
	binary.Write(buf, binary.BigEndian, []byte("heart"))
	return buf.Bytes()

}
